var t = getApp();

Component({
    properties: {
        params: {
            type: null
        },
        host: {
            type: null
        }
    },
    data: {
        signdata: {},
        tapnow: !0
    },
    lifetimes: {
        attached: function() {},
        moved: function() {},
        detached: function() {}
    },
    attached: function() {},
    ready: function() {
        this.setData({
            signdata: this.data.params
        });
    },
    pageLifetimes: {
        show: function() {},
        hide: function() {},
        resize: function() {}
    },
    methods: {
        signnow: function() {
            var n = this;
            if (n.data.tapnow) {
                n.setData({
                    tapnow: !1
                });
                var e = t.getNetAddresss("plugin.sign.Frontend.Modules.Sign.Controllers.sign.sign");
                t._getNetWork({
                    url: e,
                    success: function(t) {
                        var e = t.data;
                        if (1 == e.result) {
                            var a = n.data.signdata;
                            a.text = "已".concat(a.sign_name);
                            var o = Number(a.button_hint.replace(/[^0-9]/gi, ""));
                            a.button_hint = o + 1 + "天", n.setData({
                                signdata: a
                            }), wx.showToast({
                                title: e.msg,
                                icon: "none",
                                duration: 1500,
                                success: function() {
                                    setTimeout(function() {}, 1500);
                                }
                            });
                        } else wx.showToast({
                            icon: "none",
                            title: e.msg,
                            duration: 1500
                        }), setTimeout(function() {
                            n.setData({
                                tapnow: !0
                            });
                        }, 1500);
                    },
                    fail: function(t) {
                        console.log(t.msg);
                    }
                });
            } else console.log("点击限制！！！");
        }
    }
});